package com.longjianghuasheng.logistics.event

import com.longjianghuasheng.logistics.data.model.bean.CollectBus
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.callback.livedata.event.EventLiveData


/**
 * 作者　: hegaojian
 * 时间　: 2019/5/2
 * 描述　:APP全局的ViewModel，可以在这里发送全局通知替代EventBus，LiveDataBus等
 */
class EventViewModel : BaseViewModel() {

    //全局收藏，在任意一个地方收藏或取消收藏，监听该值的界面都会收到消息
    val collectEvent = EventLiveData<CollectBus>()

    //登录成功通知
    val loginEvent = EventLiveData<Any>()


    val toFreightEvent = EventLiveData<Int>()

    val orderSearchEvent = EventLiveData<String>()

    //订单变化通知
    val onOrderChangeEvent = EventLiveData<Any>()

    //选中订单列表通知
    val onOrderChildSelectEvent = EventLiveData<Int>()

    //选中司机订单列表通知
    val onOrderDriverSelectEvent = EventLiveData<Int>()

    //发布记录搜索通知
    val onReleaseSearchEvent = EventLiveData<String>()

    //发布记录状态改变通知
    val onReleaseStatusEvent = EventLiveData<Int>()

    //发布记录刷新通知
    val onReleaseUpdateEvent = EventLiveData<Any>()

    //抢单记录刷新通知
    val onGrabASingleUpdateEvent = EventLiveData<Int>()

    //回到我的页面通知
    val onGoBackToMyEvent = EventLiveData<Any>()

}